package com.buybuyyi.stylistcrm.resource.dao.impl;

import com.buybuyyi.stylistcrm.resource.dao.ResourceDao;
import com.buybuyyi.stylistcrm.resource.mapper.ObjectResourceMapper;
import com.buybuyyi.stylistcrm.resource.po.ObjectResource;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by yanwc on 2016/8/29.
 */
@Repository
public class ResourceDaoImpl implements ResourceDao {

    @Autowired
    public ObjectResourceMapper mapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(ObjectResource record) {
       return mapper.insert(record);
    }

    @Override
    public int insertSelective(ObjectResource record) {
       return mapper.insertSelective(record);
    }

    @Override
    public ObjectResource selectByPrimaryKey(Long id) {
       return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(ObjectResource record) {
        return mapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateByPrimaryKey(ObjectResource record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public ObjectResource selectByTempId(String tempId) {
        return mapper.selectByTempId(tempId);
    }

    @Override
    public List<ObjectResource> selectByObjectIdAndObjectName( long objectId,String objectName) {
       return mapper.selectByObjectIdAndObjectName(objectId,objectName);
    }
}
